import styled from "styled-components"
import LogoPict from "../../static/logo.png"

export const HeaderWrapper = styled.div`
    
    postition: relative;
    // z-index: 1;
    height: 58px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
`

export const Logo = styled.div`
    position: absolute;
    top: 10;
    left: 0;
    height: 58px;
    width: 100px;
    display: block;
    background: url(${LogoPict});
    background-size: contain;
`


export const Nav = styled.div`
    width: 960px;
    height: 100%;
    padding-right: 70px;
    box-sizing: border-box;
    margin: 0 auto;
`

export const NavItem = styled.div`
    color: #333333;
    line-height: 58px;
    padding: 0 20px;
    font-size: 17px;
    &.left{
        float: left;
    }
    &.right{
        float: right;
        color: #969696;
    }
    &.active{
        color: #ea6f5a;
    }
    &.reg{
        height: 38px;
        width: 80px;
        padding: 0 20px;
        line-height: 38px;
        margin: 9px 5px 0 15px;
        border: 1px solid #ea6f5a;
        border-radius: 20px;
        color: #ea6f5a;
        font-size: 15px;
        text-align: center;
    }
`

export const NavSearch = styled.input.attrs({
    placeholder: "搜索"
})`
    &.fade-enter{
        transition: all .2s ease-out;
    }
    &.fade-enter-active{
        width: 240px;
        border-radius: 19px;
    }
    &.fade-exit{
        transition: all .2s ease-out;
    }
    &.fade-exit-active{
        width: 160px;
    }
    padding: 0 40px 0 20px;
    margin-top: 8px;
    border-radius: 19px;
    box-sizing: border-box;
    height: 38px;
    width: 160px;
    background: #eee;
    color: #777;
    &::placeholder{
        color: #999;
        font-size: 14px;
    }
    &.focused {
        width:240px;
    }
`
export const Wirtting = styled.div`
    box-sizing: border-box;
    float: right;
    position: absolute;
    top: 0;
    right: 0;
    display: inline-block;
    height: 40px;
    width: 100px;
    padding: 6px 12px;
    line-height: 24px;
    margin: 15px 10px;
    border: 1px solid #ea6f5a;
    border-radius: 20px;
    background: #ea6f5a;
    color: #fff;
    font-size: 15px;
    text-align: center;
    vertical-align: middle;
`

export const SearchWrap = styled.div`
    z-index: 1;
    float: left;
    position: relative;
    .zoom{
        position: absolute;
        right: 5px;
        bottom: 5px;
        text-align: center;
        width:30px;
        line-height: 30px;
        border-radius: 15px;
        &.focused {
            background: #ccc;
        }
    }
`
export const SearchInfo = styled.div`
    background: #fff;
    position: absolute;
    left: 0;
    top: 30px;
    width: 240px;
    padding: 0 20px;
    margin-top: 20px;    
    box-shadow: 0 0 8px rgba(0,0,0, .2);
`
export const SearchTitle = styled.div`
    margin-top: 20px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    line-height: 20px;
    font-size: 14px;
    color: #969696;
    border-bottom: 1px solid #969696;
`
export const SearchChange = styled.span`
    float: right;
    font-size: 13px;
    cursor: pointer;
    .spin {
        display: block;
        float: left;
        font-size: 14px;
        margin: 2px;
        transition: all .4s ease-in;
        transform-origin: center center;
    }
`
export const SearchList = styled.div``
export const SearchItem = styled.a`
    display: block;
    float: left;
    border: #969696;
    padding: 0 5px;
    margin-right: 10px;
    margin-bottom: 15px;
    line-height: 20px;
    font-size:12px;
    border: 1px solid #ddd;
    color: #969696;
    border-radius: 5px;
`
